package com.liveHere.www.dao;

import com.liveHere.www.po.Room;
import com.liveHere.www.po.User;
import com.liveHere.www.po.Order;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author Mo312
 */
public interface UserDao {
    //注册
    public abstract boolean register(User user) throws Exception;

    //登录
    public abstract User login(String username, String password) throws Exception ;

    //更新账户余额
    public abstract boolean updateBalance(int userId, double amount) throws Exception;

    //更新个人信息
    public abstract boolean updateUserInfo(User user) throws Exception;

    // 查询待审核的用户充值
    public abstract ArrayList<User> getPendingRecharges() throws Exception;

    // 审核通过用户充值
    public abstract void approveRecharge(int userId) throws Exception;

    // 审核拒绝用户充值
    public  abstract void rejectRecharge(int userId) throws Exception;

    //更新充值状态
    public abstract boolean updateRechargeRequest(User user) throws Exception;

    //获取充值状态
    public abstract String getRechargeStatus(int userId) throws Exception;

    //更新用户余额
    public abstract boolean updateUserBalance(int userId, double newBalance) throws Exception;

}
